﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace XMLDataEditor
{
	public class MyAppCommands
	{
		static MyAppCommands()
		{
			// 在此点下面插入创建对象所需的代码。

			InputGestureCollection inputOpen = new InputGestureCollection();
			inputOpen.Add(new KeyGesture(Key.O, ModifierKeys.Control, "Ctrl+O"));
			CmdOpen = new RoutedUICommand("cmdOpen","cmdOpen",
				typeof(MyAppCommands),inputOpen);

            InputGestureCollection inputSave = new InputGestureCollection();
            inputSave.Add(new KeyGesture(Key.S, ModifierKeys.Control, "Ctrl+S"));
            CmdSave = new RoutedUICommand("cmdSave", "cmdSave",
                typeof(MyAppCommands), inputSave);

            InputGestureCollection inputListTablename = new InputGestureCollection();
            CmdListTablename = new RoutedUICommand("cmdListTablename", "cmdListTablename",
                typeof(MyAppCommands), inputListTablename);

            InputGestureCollection inputTableClear = new InputGestureCollection();
            inputTableClear.Add(new KeyGesture(Key.Delete, ModifierKeys.Shift, "Shift+Del"));
            CmdTableClear = new RoutedUICommand("cmdTableClear", "cmdTableClear",
                typeof(MyAppCommands), inputTableClear);

            InputGestureCollection inputRefresh = new InputGestureCollection();
            inputRefresh.Add(new KeyGesture(Key.F5, ModifierKeys.None, "F5"));
            CmdRefresh = new RoutedUICommand("cmdRefresh", "cmdRefresh",
                typeof(MyAppCommands), inputRefresh);
		}
		
		private static RoutedUICommand CmdOpen;
		public static RoutedUICommand cmdOpen
		{
			get { return CmdOpen; }	
		}

        private static RoutedUICommand CmdSave;
        public static RoutedUICommand cmdSave
        {
            get { return CmdSave; }
        }

        private static RoutedUICommand CmdListTablename;
        public static RoutedUICommand cmdListTablename
        {
            get { return CmdListTablename; }
        }

        private static RoutedUICommand CmdTableClear;
        public static RoutedUICommand cmdTableClear
        {
            get { return CmdTableClear; }
        }

        private static RoutedUICommand CmdRefresh;
        public static RoutedUICommand cmdRefresh
        {
            get { return CmdRefresh; }
        }
	}
}